{% extends 'base_main.html' %}

{% block extCSS %}
    <link href="/static/css/haiersoft.css" rel="stylesheet" type="text/css" media="screen,print"/>
    <link href="/static/css/print.css" rel="stylesheet" type="text/css" media="print"/>
{% endblock %}

{% block extJS %}
    <script src="/static/js/jquery-1.10.1.min.js"></script>
    <script src="/static/js/side.js" type="text/javascript"></script>
     <!--[if lt IE 9]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<script src="http://css3-mediaqueries-js.googlecode.com/svn/trunk/css3-mediaqueries.js"></script>
<![endif]-->
{% endblock %}

{% block indexbody %}
    <!-- MainForm -->
<div id="MainForm">
    <div class="form_boxA">
        <h2>班级信息列表</h2>
        <table cellpadding="0" cellspacing="0">
            <tr>
                <th>序号</th>
                <th>班级名称</th>
                <th>创建时间</th>
                <th>操作</th>
            </tr>

            {% for page in pages %}
            <tr>
                <td>{{ page.id }}</td>
                <td>{{ page.g_name | upper}}</td>
                <td>{{ page.g_create_time  }}</td>
                <td><a href="{% url 'app:editorstudent' %}?id={{ page.id }}">编辑</a></td>
            </tr>
            {% endfor %}
        </table>
        <p class="msg">共找到{{ total }}个班级记录</p>
    </div>

    <ul id="PageNum">

        <li><a href="{% url 'app:grade' %}">首页</a></li>
        {% if pages.has_previous %}
        <li><a href="{% url 'app:grade' %}?page_num={{ pages.previous_page_number }}">上一页</a></li>
        {% endif %}
        {% for i in  pages.paginator.page_range %}
        <li><a href="{% url 'app:grade' %}?page_num={{ i }}">{{ i }}</a></li>
        {% endfor %}
        {% if pages.has_next %}
        <li><a href="{% url 'app:grade' %}?page_num={{ pages.next_page_number }}">下一页</a></li>
        {% endif %}
        <li>当前{{ pages.number }}页</li>
        <li><a href="{% url 'app:grade' %}?page_num={{ pages.paginator.num_pages }}">尾页</a></li>
    </ul>

</div>

{% endblock %}
